﻿''' <summary>
''' This attribute can be applied to properties in an entity type. Each property marked with this attribute
''' will be stored in the database and displayed to the user. The user will also be able to edit the contents
''' of the field on generated user interface elements.
''' </summary>
<AttributeUsage(AttributeTargets.Property, Inherited:=False, AllowMultiple:=False)> _
Public NotInheritable Class FieldAttribute
    Inherits Attribute

    Public Property IsDisplayColumn As Boolean = True

    Public Property DisplayName As String = String.Empty

    ''' <summary>
    ''' Initializes a new instance of the <see cref="FieldAttribute" /> class.
    ''' This attribute can only be applied to properties.
    ''' </summary>
    ''' <param name="isDisplayColumn">Determines whether or not this column is displayed on generated user interface elements.</param>
    ''' <param name="displayName">If this is specified, the display name is the alternative name of the column displayed on generated user interface elements. If a name is not specified, the name of the property is used instead.</param>
    Public Sub New(Optional ByVal isDisplayColumn As Boolean = True, Optional ByVal displayName As String = "")
        Me.IsDisplayColumn = isDisplayColumn
        Me.DisplayName = displayName
    End Sub

End Class

